﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace ServiceBus.Contract
{
        [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IMessageSenderCallBack))]
        public interface IMessageSender
        {
            [OperationContract(IsOneWay = false, IsInitiating = true, IsTerminating = false)]
            void Init(string address);

        }
        [ServiceContract]
        public interface IMessageSenderCallBack
        {
            [OperationContract(IsOneWay = true)]
            void SendMessage(Message message);
            [OperationContract(IsOneWay = true)]
            void SendHeartBeat(string address);
        }
}
